/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * 说明：
 * Entity Name 商店充值规则
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TShopVisit")
public class TShopVisit implements Serializable,TBehavior{

	private static final long serialVersionUID = 1L;
	
	private String VisitID;
	
	private TUser tUser;
	
	private Date HappenTime;
	
	private int SourceType;
	
	private String Source;
	@Id
	@Column(name = "VisitID", length=15)
	public String getVisitID() {
		return VisitID;
	}

	public void setVisitID(String visitID) {
		VisitID = visitID;
	}
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="UserID")
	public TUser getTUser() {
		return tUser;
	}
	
	public void setTUser(TUser user) {
		tUser = user;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}
	@Column(name = "SourceType")
	public int getSourceType() {
		return SourceType;
	}

	public void setSourceType(int sourceType) {
		SourceType = sourceType;
	}
	@Column(name = "Source", length = 15)
	public String getSource() {
		return Source;
	}

	public void setSource(String source) {
		Source = source;
	}

	@Override
	@Transient
	public Date getBHappenTime() {
		// TODO Auto-generated method stub
		return this.HappenTime;
	}

	@Override
	@Transient
	public String getBUserID() {
		// TODO Auto-generated method stub
		return this.tUser.getUserID();
	}

	@Override
	@Transient
	public BehaviorType getBType() {
		// TODO Auto-generated method stub
		return BehaviorType.BehaviorVisit;
	}

	@Override
	@Transient
	public String getBTypeName() {
		// TODO Auto-generated method stub
		return "访问网站";
	}
	
	
}
